package com.mikao.controller;

import com.mikao.dto.vo.BaseResult;
import com.mikao.dto.vo.ServiceDto;
import com.mikao.service.ServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.context.annotation.Scope;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**git
 * @author kenny
 */
@Api(description = "客服")
@RestController
@RequestMapping("/service")
@Scope("prototype")
@Validated
public class ServiceController {

    private ServiceService serviceService;

    public ServiceController(ServiceService serviceService) {
        this.serviceService = serviceService;
    }

    @ApiOperation("客服列表")
    @GetMapping("/list")
    public BaseResult<List<ServiceDto>> list() {
        return serviceService.list();
    }
}
